import LayoutWithSidebar from '@/components/Layout/LayoutWithSidebar';
import LayoutWithoutSidebar from '@/components/Layout/LayoutWithoutSidebar';
import CommonView from '@/components/routerview';



// 员工管理
const Personnel = () => import('@/views/personnel/index.vue');
const Employee = () => import('@/views/personnel/employee/index.vue');
const Roster = () => import('@/views/personnel/employee/roster/index.vue');
const Survey = () => import('@/views/personnel/employee/archive/survey/index.vue');
const SurveySatus = () => import('@/views/personnel/employee/archive/survey/status/index.vue');
const List = () => import('@/views/personnel/employee/roster/list/index.vue');
const StatisticalOverview = () => import('@/views/personnel/employee/statistics/statistical-overview/index.vue');

const ReportHome = () => import('@/views/personnel/employee/report/home/index.vue');
const Dynamic = () => import('@/views/personnel/employee/dynamic/index.vue');
// 员工管理 end


// 员工关系

// 入职管理
const Addemployee= () => import('@/views/personnel/relation/enrollment/add/employee/index.vue');
const Addcandidate= () => import('@/views/personnel/relation/enrollment/add/candidate/index.vue');
const Add= () => import('@/views/personnel/relation/enrollment/add/index.vue');
const WaitList= () => import('@/views/personnel/relation/enrollment/wait-list/index.vue');
const NewList= () => import('@/views/personnel/relation/enrollment/new-list/index.vue');
const AbandonList= () => import('@/views/personnel/relation/enrollment/abandon-list/index.vue'); 

// 转正管理
const Probation= () => import('@/views/personnel/relation/probation/index.vue');//转正管理

// 离职管理

const Departure= () => import('@/views/personnel/relation/departure/index.vue');
const Leaving= () => import('@/views/personnel/relation/departure/leaving/index.vue');
const Leaved= () => import('@/views/personnel/relation/departure/leaved/index.vue');

// 人事异动

const UnusualActionHome= () => import('@/views/personnel/relation/unusual-action/home/index.vue');

// 员工关怀
const Care= () => import('@/views/personnel/relation/care/index.vue');
const Birthday= () => import('@/views/personnel/relation/care/birthday/index.vue');
const Anniversary= () => import('@/views/personnel/relation/care/anniversary/index.vue');
const SMS= () => import('@/views/personnel/relation/care/sms/index.vue');

// 合同管理
const Contract= () => import('@/views/personnel/relation/contract/index.vue');
const Signed= () => import('@/views/personnel/relation/contract/signed/index.vue');
const NotSigned= () => import('@/views/personnel/relation/contract/not-signed/index.vue');
const ContractRecord= () => import('@/views/personnel/relation/contract/record/index.vue');
const ContractSurvey= () => import('@/views/personnel/relation/contract/survey/index.vue');


// 任职记录
const Office= () => import('@/views/personnel/relation/office/index.vue');

// 培训经历
const Train= () => import('@/views/personnel/relation/train/index.vue');

// 奖惩记录
const Award= () => import('@/views/personnel/relation/award/index.vue');

// 考察期管理
const InspectHome= () => import('@/views/personnel/relation/inspect/home/index.vue');


// 实习生管理
const InternshipHome= () => import('@/views/personnel/relation/internship/home/index.vue');


const personnel =   {
    path: '/personnel',
    component: LayoutWithSidebar,
    redirect: "/personnel/employee",
    children: [
      {
        path: 'employee',
        component: Employee,
        redirect: "/personnel/employee/roster",
        meta:{
          name:"员工"
        },
        children: [
          {
            path: 'roster',
            component: Roster,
            meta:{
              name:"员工"
            },
            redirect: "/personnel/employee/roster/list",
            children: [
              {
                path: 'list',
                component: List,
              }
            ]
          },
          {
            path: 'archive',
            redirect: "/personnel/employee/archive/survey",
            component: CommonView,
            meta:{
              name:"员工档案库"
            },
            children: [
              {
                path: 'survey',
                component: Survey,
                meta:{
                  name:"员工档案概况"
                },
                redirect: "/personnel/employee/archive/survey/status",
                children: [
                  {
                    path: 'status',
                    component: SurveySatus,
                    meta:{
                      name:"概况详情"
                    },
                  }
                ]
              }
            ]
          },
          {
            path: 'statistics',
            redirect: "/personnel/employee/statistics/statistical-overview",
            component: CommonView,
            meta:{
              name:"统计分析"
            },
            children: [
              {
                path: 'statistical-overview',
                component: StatisticalOverview,
                meta:{
                  name:"统计概况"
                },
              }
            ]
          },
          {
            path: 'report',
            redirect: "/personnel/employee/report/home",
            component: CommonView,
            meta:{
              name:"人事报表"
            },
            children: [
              {
                path: "home",
                component: ReportHome,
                meta:{
                  name:"人事报表home"
                },
              }
            ]
          },
          {
            path: 'dynamic',
            component: Dynamic,
            meta:{
              name:"人事动态"
            },
          }
        ]
      },
      {
        path: 'relation',
        component: CommonView,
        redirect: '/personnel/relation/enrollment',
        meta:{
          name:"员工关系"
        },
        children: [
          {
            path: 'enrollment',
            component: CommonView,
            redirect: "/personnel/relation/enrollment/wait-list",
            meta:{
              name:"入职管理"
            },
            children: [
              {
                path: 'add',
                redirect: "/personnel/relation/enrollment/add/employee",
                component: Add,
                meta:{
                  name:"添加员工"
                },
                children: [
                  {
                    path: 'employee',
                    meta:{
                      name:"添加新员工"
                    },
                    component: Addemployee,
                  },
                  {
                    path: 'candidate',
                    meta:{
                      name:"添加待入职"
                    },
                    component: Addcandidate
                  }
                ]
              },
              {
                path: 'wait-list',
                component: WaitList,
                meta:{
                  name:"待入职"
                },
              },
              {
                path: 'new-list',
                component: NewList,
                meta:{
                  name:"最近入职"
                },
              },
              {
                path: 'abandon-list',
                component: AbandonList,
                meta:{
                  name:"放弃入职"
                },
              },
            ]
          },
          {
            path: 'probation',
            component: Probation,
            meta:{
              name:"转正管理"
            },
          },
          {
            path: 'departure',
            component: Departure,
            redirect: "/personnel/relation/departure/leaving",
            meta:{
              name:"离职管理"
            },
            children: [
              {
                path: 'leaving',
                component: Leaving,
                meta:{
                  name:"待离职"
                }
              },
              {
                path: 'leaved',
                component: Leaved,
                meta:{
                  name:"已离职"
                }
              }
            ]
          },
          {
            path: 'unusual-action',
            component: CommonView,
            redirect: "/personnel/relation/unusual-action/home",
            meta:{
              name:"人事异动"
            },
            children: [
              {
                path: 'home',
                component: UnusualActionHome,
                meta:{
                  name:"异动home"
                },
              }
            ]
          },
          {
            path: 'care',
            component: Care,
            redirect: "/personnel/relation/care/birthday",
            meta:{
              name:"员工关怀"
            },
            children: [
              {
                path: 'birthday',
                component: Birthday,
                meta:{
                  name:"生日"
                },
              },
              {
                path: 'anniversary',
                component: Anniversary,
                meta:{
                  name:"入职周年"
                },
              },
              {
                path: 'sms',
                component: SMS,
                meta:{
                  name:"自定义短信"
                },
              }
            ]
          },
          {
            path: 'contract',
            component: Contract,
            redirect: "/personnel/relation/contract/signed",
            meta:{
              name:"员工关怀"
            },
            children: [
              {
                path: 'signed',
                component: Signed,
                meta:{
                  name:"已签订合同"
                },
              },
              {
                path: 'not-signed',
                component: NotSigned,
                meta:{
                  name:"未签订合同"
                },
              },
              {
                path: 'record',
                component: ContractRecord,
                meta:{
                  name:"已签订合同"
                },
              },
              {
                path: 'survey',
                component: ContractSurvey,
                meta:{
                  name:"合同概况"
                },
              }
            ]
          },
          {
            path: 'office',
            component: Office,
            meta:{
              name:"任职记录"
            },
          },
          {
            path: 'train',
            component: Train,
            meta:{
              name:"培训经历"
            },
          },
          {
            path: 'award',
            component: Award,
            meta:{
              name:"奖惩记录"
            },
          },
          {
            path: 'inspect',
            component: CommonView,
            redirect: "/personnel/relation/inspect/home",
            meta:{
              name:"考察期"
            },
            children: [
              {
                path: 'home',
                component: InspectHome,
                meta:{
                  name:"考察期home"
                },
              },
              {
                path: 'add-inspect',
                component: InspectHome,
                meta:{
                  name:"添加考察期人员"
                },
              }
            ]
          },
          {
            path: 'internship',
            component: CommonView,
            redirect: "/personnel/relation/internship/home",
            meta:{
              name:"实习生管理"
            },
            children: [
              {
                path: 'home',
                component: InternshipHome,
                meta:{
                  name:"实习生管理home"
                },
              },
              {
                path: 'add-inspect',
                component: InternshipHome,
                meta:{
                  name:"添加实习生"
                },
              }
            ]
          },
         
        ]
      }
    ]
  }


export default personnel;